package com.mapps.jurado.adapter;

import java.util.List;

import com.mapps.jurado.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ListaNotasAdapter extends BaseAdapter {

	private Context context;
	private List<String> list;
	
	public ListaNotasAdapter(Context context, List<String> list){
		this.context = context;
		this.list = list;
	}
	
	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View v, ViewGroup viewGroup) {
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View view = inflater.inflate(R.layout.layout_adapter_lista_notas, null);
		TextView textViewNota = (TextView) view.findViewById(R.id.textViewAdapterNota);
		
		String nota = list.get(position);
		textViewNota.setText(nota);
		
		return view;
	}

}
